Electronic revenue meter with automatic service sensing

ABSTRACT

An integral electronic revenue meter system diagnostics package including a microprocessor, storage memory, preselect series of system diagnostic tests, and recording any results which exceed predefined programmable thresholds, and display means for displaying error and/or diagnostic messages identifying selected diagnostic data and/or errors discovered in the meter tests during a predefined period is included as part of an electricity revenue meter of the type used for collecting metering data for a utility which uses such data for billing purposes. The system automatically senses the type of electrical service in which the revenue meter is installed when the revenue meter is installed in a socket at the customer&#39;s premises.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a divisional of U.S. Ser. No. 10/386,811, filed Mar.10, 2003, now U.S. Pat. No. 6,906,507, which is a continuation of U.S.Ser. No. 10/165,568 filed Jun. 7, 2002, now abandoned, which is acontinuation of U.S. Ser. No. 08/859,597 filed May 19, 1997, nowabandoned, which is a continuation of U.S. Ser. No. 08/509,367 filedJul. 31, 1995 which issued as U.S. Pat. No. 5,631,554 on May 20, 1997.

U.S. Pat. No. 5,631,554 is a continuation-in-part of U.S. Ser. No.08/037,938 filed Mar. 26, 1993 which issued as U.S. Pat. No. 5,469,049on Nov. 21, 1995; and

U.S. Pat. No. 5,469,049 is related to U.S. Ser. No. 08/333,660 filedNov. 3, 1994 as a divisional of U.S. Ser. No. 08/037,938, U.S. Ser. No.08/333,660 issuing Nov. 28, 1995 as U.S. Pat. No. 5,471,137.

Each of the preceding applications and patents are incorporated fullyherein by reference.

TECHNICAL FIELD

The present invention relates to an integral method and apparatus forconducting system installation diagnostics in a solid state electronicelectricity revenue meter.

BACKGROUND ART

As used herein, the term “revenue meter” refers to an electricity meterthat is typically installed by an electric utility at a customer's sitefor the purpose of measuring the electricity usage of the customer forbilling purposes. As is well known by those skilled in the art, revenuemeters are generally mounted at a customer's site on a substantiallypermanent basis, as they are typically “sealed” in place in a socketthat is permanently mounted at the customer's site. Accordingly, theterm “revenue meter”, as used herein is not intended to include metersthat are not intended to be socket mounted on a substantially permanentbasis. In particular, meters, of the type that include leads forconnecting to the circuit being measured are not considered to berevenue meters.

Induction-type watt hour revenue meters typically employ a pulseinitiator that generates pulses in proportion to the rate of rotation ofa meter disk. These generated pulses are transmitted to electronicregisters for deriving current, voltage, power and/or time of use energyconsumption.

Various types of solid state polyphase electronic revenue meters arealso in common use today. These polyphase electronic revenue meters,which monitor electrical energy consumption and record or report suchconsumption in kilowatt hours, power factor, KVA, and/or reactive voltamperes, typically employ solid state components, and may utilizeanalog-to-digital converters to provide digital data rather than pulsedata from which various demand/consumption indicators can be extracted.

It is also well known to provide solid state electronic revenue metersthat may be configurable for installation in any one of a variety ofsingle or multiphase electricity distribution systems. One example of asolid state electronic watt hour revenue meter is disclosed in U.S. Pat.No. 5,059,896, issued to Germer et al.

An example of a solid state electricity demand recorder that may be usedin conjunction with a conventional watt hour meter is disclosed in U.S.Pat. No. 4,697,182, issued to Swanson.

Various ancillary equipment and diagnostic techniques are utilized byservice personnel during installation of these revenue meters in anattempt to insure and confirm that the installation of revenue meters isbeing done correctly. In particular, such ancillary equipment includes avariety of meters, which are not revenue meters, as they typicallyinclude, or are adapted to include, cables for connecting them to thecircuit being measured. Ancillary equipment used for this purpose is notintended to become a permanent part of the electric circuit, and it isnot adapted to be plugged into a meter socket for such purpose. Further,while such equipment can be used to measure electric parameters betweentwo or more points, they require manual intervention to determine thepoints between which such measurements are made. A revenue meter, on theother hand, is plugged directly into a socket that has been wired to thecustomer's permanent electric service. Accordingly, when a revenue meteris plugged in, there is no manual intervention to determine what will bemeasured, as such determination will have been made when the metersocket was wired into the system. Accordingly, while the ancillaryequipment of the prior art can be used to determine whether or not thesocket has been wired correctly, manual intervention is required. Inaddition, such ancillary equipment typically required manualinterpretation of the results of the measurements made by their users.Consequently, many installation checks, such as polarity and cross-phasechecks, are derived on site by field personnel and are thereforedependent upon the knowledge and competence of those personnel.

While various diagnostic equipment is available for use by fieldpersonnel during installation and periodic maintenance, a need existsfor an integral apparatus that automatically and periodically performs astandard series of system and installation diagnostics withoutinterrupting the operation of the meter. In addition, there is a needfor periodic self-checks of the meter to determine and record theoccurrence of selected pre-defined fatal and non-fatal errors in themeter's operation.

In addition, although there are revenue meters available that may beadapted for use in more than one type of electrical service, onedrawback of these revenue meters is that the customer often must programthe service type into the meter prior to installation. Thispre-installation programming of multiple service revenue meters tends tolimit their multiple service capability.

SUMMARY OF THE INVENTION

An object of the present invention is therefore to provide an integralsystem checking and troubleshooting package for a solid state electronicrevenue meter.

It is another object of the present invention to provide a method andapparatus that is integral with a solid state revenue meter and thatautomatically performs a series of predefined system installation anddiagnostic tests on the meter.

It is still another object of the present invention to provide a systemchecking and troubleshooting package that supports and is integral to anelectronic revenue meter, and that includes means for displaying theresults of selected self-checks and system diagnostic tests wheninterrogated by service personnel.

It is yet another object of the present invention to provide anautomated system checking apparatus that periodically checks for theexistence of certain predefined conditions and that, depending upon thenature of the error, takes predefined action in response to thedetection of any such errors.

It is another object of the present invention to provide a method andapparatus for determining the phase angles of each voltage and currentphasor with respect to a preselected base phasor, for the purpose ofverifying that all meter elements are sensing and receiving the correctvoltage and current for each phase of a multi-phase electric service.

It is yet another object of the present invention to provide a methodand apparatus that is integral with the solid-state multiple servicerevenue meter and that automatically senses the specific type ofelectrical service after the revenue meter has been installed, andperiodically during its operation.

In accordance with the present invention, an integral electronic revenuemeter self-checking and system diagnostics package is provided,including a microprocessor, storage memory, logic for automatically andperiodically performing a preselected set of meter self checks andrecording any errors therefrom, logic for automatically performing apreselected series of system diagnostics tests, and recording anyresults that exceed predefined programmable thresholds, and displaymeans for displaying error and/or diagnostic messages identifying,respectively, one or more self-check errors or selected diagnostic dataand/or errors discovered in the meter self-checks during a predefinedperiod.

The device of the present invention is preferably integrated into asolid state revenue meter that utilizes an analog-to-digital converterand associated digital sampling techniques to obtain digital datacorresponding to current and voltage for one or more phases of a singlephase or multi-phase system to which the revenue meter is connected.

The present invention automatically performs the preselected meterself-checks, preferably once per day, and/or when power is restored tothe meter following an outage, and/or when a full meter reconfigurationis performed, thereby verifying the continued functionability ofselected meter components. In the preferred embodiment, for example, thedevice of the present invention checks its own memory, microprocessor,and selected registers in the meter to determine whether the billingdata has been corrupted since the last check. Since the corruption ofbilling data is considered a fatal error of the revenue meter, thedevice of the present invention would generate and display an error codeindicating the nature of the error, lock the display on the error code,and cease all meter functions (except communications functions) untilthe meter has been reconfigured.

In addition, the device also periodically checks for other, non-fatal,errors such as for register overflows, clock, time of use, reverse powerflow, and low battery errors. The frequency of error checking may varydepending upon the component and/or condition checked, as well as thepotential effect of the error on the continued operation of the meter.Once discovered, non-fatal errors may or may not lock out the displaydepending upon the nature of the error and how the particular meter isconfigured.

The present invention also periodically performs a series of preselectedsystem diagnostics tests. These tests are at installation of the meterand preferably about once every five seconds during the normal operationof the meter. In the preferred embodiment, the device conducts apolarity, cross-phase and energy flow diagnostic, a phase voltagedeviation diagnostic, an inactive phase current diagnostic, a per phasepower factor diagnostic, and a current waveform distortion detectiondiagnostic utilizing factory defined parameters as well as user-definedparameters that may be specified by personnel in the field atinstallation.

In conducting the polarity, cross-phase and energy flow diagnostic, thedevice of the present invention utilizes accumulated current and voltageinformation to determine the phase angle of each voltage and currentphasor (for example V_(B), V_(C), I_(A), I_(B), and I_(C)) with respectto a reference phasor (for example V_(A)) in a multi-phase system. Theproper position of each phasor for this installation is predefined andused as an exemplar for comparison to the calculated phase angle todetermine whether each angle falls within a predefined envelope. If anyone of the calculated phase angles falls outside its correspondingpredefined envelope, a diagnostic error message may be displayed. Thisdiagnostic is particularly useful at installations since this error mayindicate cross-phasing of a voltage or current circuit, incorrectpolarity of a voltage or current circuit, reverse energy flow of one ormore phases (cogeneration), or an internal meter measurementmalfunction.

The device of the present invention also preferably includes a “Toolbox”display that, when manually activated by field personnel, causes thedisplay to scroll through a list of preselected values, such as voltageand current for each phase, the angles associated with each voltage andcurrent phasor, and the numbers of occurrences of each diagnosticfailure, for review by field personnel.

In one embodiment of the present invention, the device of the presentinvention automatically senses the type of electrical service (i.e.,Single phase, three-wire Delta, four-wire Wye, or four-wire Delta) whenthe revenue meter is installed, after a power-up, and also, preferably,periodically during the normal operation of the meter.

The system diagnostics, Toolbox display, and automatic service sensingfunctions are performed by the device of the present invention withoutinterruption in the operation of the meter except when such operation ispurposely suspended as a result of a fatal error.

The above objects and other objects, features, and advantages of thepresent invention are readily apparent from the following detaileddescription of the best mode for carrying out the invention when takenin connection with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of the system;

FIG. 2 is a perspective view of a revenue meter into which the system ofthe present invention may be integrated;

FIG. 3 is a block diagram of the revenue meter of FIG. 2;

FIG. 4 is a flowchart of the electrical system diagnostics checks of thepresent invention;

FIG. 5 is a flowchart of a first portion of the polarity, cross phaseand energy flow diagnostic implemented by the present invention;

FIG. 6 is a flowchart of the second portion of the polarity, cross phaseand energy flow diagnostic implemented by the present invention;

FIG. 7 is a flowchart of a first portion of the phase voltage deviationdiagnostic routine implemented by the present invention;

FIG. 8 is a flowchart of a second portion of the phase voltage deviationdiagnostic implemented by the present invention;

FIG. 9 is a flowchart of a first portion of the inactive phase currentdiagnostic implemented by the present invention;

FIG. 10 is a flowchart of a second portion of the inactive phase currentdiagnostic implemented by the present invention;

FIG. 11 is a flowchart of a first portion of the per phase power factordiagnostic implemented by the present invention;

FIG. 12 is a flowchart of a second portion of the per phase power factordiagnostic implemented by the present invention;

FIG. 13 is a flowchart of a third portion of the per phase power factordiagnostic implemented by the present invention;

FIG. 14 is a list of the items displayed in the Toolbox display;

FIG. 15 is a phasor diagram for a typical three phase revenue meterinstallation;

FIG. 16 is a graph illustrating the relationship of the wave formsrepresenting two phase quantities tracked by the system;

FIG. 17A is the first portion of a block schematic of the front-endmodule 42 of FIG. 3;

FIG. 17B is the second portion of a block schematic of the front-endmodule 42 of FIG. 3;

FIG. 18A is the first portion of a block schematic of the registermodule 48 of FIG. 3;

FIG. 18B is the second portion of a block schematic of the registermodule 48 of FIG. 3;

FIG. 19 is a first flowchart of the current waveform distortiondetection diagnostic implemented by the present invention;

FIG. 20 is a second flowchart of the current waveform distortiondetection diagnostic implemented by the present invention;

FIG. 21 is a table illustrating the revenue meter form factors and theassociated types of electrical services that they may support;

FIG. 22 is a flowchart of a first portion of the automatic servicesensing function implemented by the present invention; and

FIG. 23 is a flowchart of a second portion of the automatic servicesensing function implemented by the present invention.

BEST MODE OF OPERATION

Referring to FIG. 1, the system of the present invention, generallydesignated as 20, is an electricity revenue meter that is of the typethat is intended to be plugged into a meter socket of the type that ispermanently installed at an electricity utility's customer's site. As iswell known in the art such sockets are wired into an electric utility'selectricity supply lines, and they break the continuity of such supplylines to the customer's premises, so that it is necessary to have arevenue meter installed in such socket for the purpose of restoring suchcontinuity. At the same time such revenue meters meter the usage ofelectricity by the customer.

Generally, the sockets are permanently installed at the customer's siteat the time the location is constructed or when electric service is tobe brought to an existing structure. Thereafter, a revenue meter isinstalled, and typically “sealed” to the socket to make suchinstallation substantially permanent, except that revenue meters may beremoved by breaking the seal and thereby terminating electricity serviceto such location until such time as another revenue meter has beeninstalled.

As the wiring of sockets is done at a time different from the actualinstallation of a revenue meter, those skilled in the art recognize thatsuch sockets include means, such as receptacles, that interact withcomplementary means, such as plugs, on the revenue meter. Accordingly,in a typical installation of an electricity revenue meter, bayonet plugson the base of the revenue meter plug into the socket, therebyconnecting the electricity service to the customer's site.

As explained above, the present invention relates to revenue meters, ofthe type that are intended to provide and record electricity usage to acustomer's premises, by both completing the circuit to the customer'spremises and by measuring the electricity parameters of such service aselectricity passes through such revenue meter.

In view of the foregoing, the revenue meter of the present invention isautomatically connected to the existing service, based solely upon theconfiguration of the plugs on the revenue meter, and not upon anydecision on the part of the meter installer, although the manner inwhich the socket had been installed at the customer's site willdetermine the various phases and other parameters sensed by the revenuemeter, as explained more fully hereinafter.

Those skilled in the art will recognize that there are inherentdifferences between revenue meters, that are plugged into an existingcircuit, and other ancillary metering equipment that can be used todetermine the phases and other parameters of electricity service towhich such ancillary equipment is connected, typically by the use ofclips and meter leads. Further, those skilled in the art will recognizethat human intervention and interpretation is generally required whenancillary equipment is used. Thus, by way of example if a 3030/3060PowerProfiler, manufactured by BMI is used, it must be hooked into theservice being checked, using probes and cables. This means that atechnician must know how to connect the various probes to the electricservice, and the technician must know how to connect such probes to thePowerProfiler. Thereafter, a technician must know how to interpret thevarious voltage and current phasor diagrams that are produced on thePowerProfiler in order to determine if the correct connections have beenmade. As will be obvious to those skilled in the art incorrect phasorscan result from either incorrect connections to the service beingchecked or incorrect hookups to the PowerProfiler. Similarly, if thetechnician using the PowerProfiler is not well skilled in its use, theconnections to the PowerProfiler may be made incorrectly, therebyresulting in incorrect readings that may thereafter result in thetechnician changing otherwise correct hookups to a meter socket.

In order to eliminate any of the foregoing needs for ancillary meteringequipment, such as the PowerProfiler, and in order to eliminate the needto properly hook up such ancillary equipment and to interpret thereadings obtained by such equipment, the revenue meter of the presentinvention is hooked up by merely inserting it into its socket.Thereafter, the revenue meter of the present invention willautomatically sense and display the properties of the electricalconnection, independently of the knowledge or skill of the person makingthe connection, so that no skilled technician, probes, or cables areneeded.

Accordingly, with reference to FIGS. 1 and 2, the revenue meter of thepresent invention includes a central processing unit 22, storage memory24 adequate for storing digital data corresponding to the periodicsamples of the voltage and current data from the voltage A/D converter26 and current AID converter 28, respectively, logic 30 for performingthe meter self-check and system and installation diagnostics supportedby the system, and display means 32 for displaying error and diagnosticinformation.

Referring to FIG. 2, the system 20 is preferably incorporated into asolid state polyphase Kilowatt/Kilowatt-hours (“KW/kWh”) single functionrevenue meter 34 (as illustrated in FIGS. 3, 17A-B and 18A-B andhereafter described in greater detail) including a generally circularbase 36, conventional molded plastic housing (not shown) to which afaceplate 38 is affixed, and a meter cover 40. The revenue meter 34 alsoincludes conventional current sensing elements adapted for connection toexisting electrical systems.

Referring now to FIG. 3, in the preferred embodiment the diagnosticslogic 30 for the system 20 of the present invention is incorporated intothe front-end module 42 of the revenue meter including a microprocessor44, an 8 bit A/D converter that serves as the voltage A/D converter 26,random access memory 45, that serves in part as part of the systemstorage memory 24, and read-only memory and EEPROM, where the systemdiagnostics logic is located, at 46. The front-end module alsopreferably supports other meter functions, including meter componentself-checks, A/D sampling, energy calculations, present demand,instantaneous values, any optional outputs, and meter communications inaddition to the system and installation diagnostics and Toolbox displayperformed by the system 20 of the present invention. The display in thisembodiment is a liquid crystal display 33 preferably including nineseven segment digits, three decimal points and a plurality of iconsuseful in displaying electrical system information normally displayed byconventional revenue meters as well as the diagnostic data generated bythe system of the present invention, substantially as shown in FIG. 3.

The revenue meter 34 also includes a register module 48 having amicroprocessor 50 including: read only memory; random access memory 51,that also serves in part as system storage memory; a 96 segment LCDdisplay driver; and 24 I/O lines. In this embodiment, the read onlymemory and register CPU 50 include the display logic for generating theToolbox display as well as the diagnostic error codes generated by thesystem 20 of the present invention. The register module 48 also supportsother meter functions such as maintaining the billing values and billingregister related functions, as well as time related functions includingself-read, time of use, time of operation, and mass memory.

It should be noted, that in the embodiment of the revenue meter 34 shownin FIG. 3, the system 20 of the present invention utilizes an 8 byte A/Dconverter 26 for sensing voltage signals, and an external 12 byte A/Dconverter 28 for sensing current samples. As will be appreciated bythose skilled in the art, the current converter 28 requires higherresolution since current varies over a wider range than voltage. It willalso be appreciated by those skilled in the art that it is preferable tohave separate converters for simultaneously sensing the current andvoltage so that the phase error caused by the current transformer may bedirectly compensated by adjusting the delay between the current sampleand the voltage sample. Thus, in the event the current transformer isideal and imparts no phase delay, then voltage and current can besampled simultaneously with the independent converters 26 and 28.

The display logic for generating the Toolbox display and diagnosticerror message of the system 20 is part of the display logic 52 that isimplemented by the register CPU 50 in the particular embodiment of FIG.3. It will be appreciated by those skilled in the art, however, that thelogic and CPU capabilities of the system of the present invention may beimplemented in a simpler single processor architecture (such as shown inFIG. 1), as well as the architecture shown in FIG. 3, or other hardwareimplementations without departing from the spirit of the presentinvention.

The system 20 of the present invention provides a full range of systemdiagnostic capabilities and diagnostic display functions through the“Toolbox” display. The system and installation diagnostics are definedin part by the user via the programming software. The Toolbox is adisplay of a fixed set of diagnostic information contained in a specialmode of operation that can be accessed by a user, typically fieldpersonnel, preferably by activating a magnetic switch on the revenuemeter. Each of the diagnostic capabilities will be discussed in furtherdetail below.

In one embodiment, the system 20 also provides an automatic servicesensing capability. As described in further detail below, thiscapability includes logic for automatically determining the electricalservice supported by the revenue meter at installation, on subsequentpower-ups, and periodically during the operation of the revenue meter,based upon the pre-programmed form number of the revenue meter and theangular displacement of voltage vectors Va and Vc, that areautomatically periodically determined by the system as described below.

System and Installation Diagnostics

The system 20 of the present invention performs a plurality of systemand installation diagnostics that may indicate potential problems withthe electrical service, the incorrect installation of the revenue meter,or internal meter malfunctions. Although these diagnostics may vary,depending upon the type of electrical service supported by the revenuemeter, the below-described diagnostics are typically performed by thesystem.

Referring to FIG. 4, the system and installation diagnostics are alsopreferably implemented as a state machine. In the preferred embodiment,the diagnostics consist of four diagnostics that the user may choose forthe revenue meter to perform—(1) Polarity, Cross Phase and Energy FlowCheck; (2) Phase Voltage Deviation Check; (3) Current Transformer Check;(4) Per-Phase Power Factor Check; and (5) Current Waveform DistortionCheck. All selected diagnostics are performed by the revenue meter atleast once every 5 sample intervals.

When any error condition occurs according to the parameters defined bythe user corresponding to the failure of a diagnostic, the revenue meterdisplays information to indicate the error condition, and optionallytriggers an output contact closure, such as a mercury wetted relay or asolid state contact programmed as an “Error Condition Alert.” When anoptional output is programmed as an Error Condition Alert, this outputcontact will close whenever any diagnostic error that has been selectedby the user is triggered.

Referring again to FIG. 4, the system 20 of the present inventionpreferably iterates through a series of calculations and diagnosticchecks, shown at 54-62. In the preferred embodiment, processing time isdivided into sample intervals equal to 60 periods of the power lineclock. For example, in a 50 Hz installation, the sampling interval wouldbe 1.2 seconds. In a 60 Hz installation, the sampling interval would be1 second.

Using a simple counter, the system 20 performs the necessary samplingand calculations to determine the angle of I_(A) (preferably relative tothe base phasor V_(A)), as well as performing Diagnostic Check #1 duringthe first interval, as shown at 54.

In the second interval, at 56, the system 20 accumulates the necessarysamples to calculate the angle for I_(B) and performs Diagnostic Check#2.

In the third interval, at 58, the system accumulates the necessarysamples to calculate the phase angle for I_(C) and performs DiagnosticCheck #3.

In the fourth interval, at 60, the system accumulates the necessarysamples to calculate the phase angle for V_(B) and performs DiagnosticCheck #4.

In the fifth sample interval, at 62, the system accumulates thenecessary samples to calculate the phase angle for V_(C) performsDiagnostic Check #5, and sets the counter to zero.

The counter is incremented (at 64) at the end of each of theseintervals, and the sequence is repeated continuously. Thus, in a 60 Hzsystem, the phase angle for each of the current and voltage phasors iscalculated, and each of the four diagnostic checks are performed, onceevery 5 seconds. As will be appreciated by those skilled in the art,different time intervals can be implemented and/or the sub-routines of54-62 can be modified to accommodate more frequent or less frequentchecks of one or more of the selected diagnostics as desired.

DIAGNOSTIC #1—Polarity, Cross Phase and Energy Flow Check

Referring to FIGS. 5 and 6, the Polarity, Cross Phase and Energy FlowCheck is designed to check for reversed polarity of any phase voltage orcurrent, and to check for voltage from one phase being incorrectly wiredto the current from a different phase. This condition may also resultfrom the presence of cogeneration. This check is accomplished byperiodically measuring the angle for each voltage and current phasorwith respect to a reference phasor (preferably V_(A)). Each angle iscompared to its ideal angle, defined as the angle that would result froma balanced, purely resistive load. If any voltage angle is lagging orleading its ideal angle by more than a predefined amount, (preferably10°), or if any current angle is lagging or leading its ideal angle bymore than a second predetermined amount (preferably 90°), the revenuemeter indicates a Diagnostic #1 error.

As shown in FIG. 5, the Polarity, Cross Phase and Energy Flow Checkdiagnostic routine 66 of the system 20 first checks each angle (whereapplicable for the particular electrical system to which the revenuemeter is connected) of each of the current and voltage phasors (at68-76) to determine whether each is within tolerance of thepredetermined ideal for an ABC rotation. If any of the angles are notwithin tolerance of the ideal, the system sets the abc flag false (at78) and proceeds (as shown in FIG. 6) to check each of the angles,assuming a CBA rotation. If all of the angles are determined at 68-76 tobe within tolerance of their predetermined ideal, the system 20 sets theabc flag true, at 80, and proceeds to check the angles assuming a CBArotation.

Referring now to FIG. 6, once the ABC rotation check is performed, thesystem proceeds at 82-90 to check the angles for each of the current andvoltage phasors to determine whether, for a CBA rotation, the phaseangles are within tolerance of the predetermined ideal angles. If anyone of the phase angles is outside of the range of tolerance for thepredetermined ideal angle for that phasor, the system sets the cba flagfalse, at 92. If all of the phase angles are determined to be withintolerance of the predetermined ideal angles, the system sets the cbaflag true, at 94. The system 20 then determines whether either the abcor the cba flag is true. If either is true, this diagnostic check ispassed. If neither the abc flag nor the cba flag is true, the diagnosticcheck has failed for both ABC and CBA rotations, indicating a diagnosticerror.

When a diagnostic error is determined, the system records the occurrenceof the error and displays the error as further described hereinafter. Inthe preferred embodiment, however, the initial display of thisdiagnostic error will not occur until the error condition has beenpresent for three consecutive checks.

As will be appreciated by those skilled in the art, this diagnostic mayindicate one of several problems, including cross phasing of a potentialor current circuit, incorrect polarity of a potential or currentcircuit, reverse energy flow of one or more phases, or internal metermeasurement malfunction.

DIAGNOSTIC #2—Phase Voltage Deviation Check

Referring now to FIGS. 7 and 8, the Phase Voltage Deviation Check isdesigned to check, at 98, for any phase voltage being outside anenvelope defined by the user. This is actually a check of thedistribution transformer voltage gap. This check is accomplished byperiodically measuring the voltage for each phase and checking itagainst a predefined voltage envelope referenced by the programsoftware.

The formula used for this check is:

$\begin{matrix}{{V_{upper} = {\left( {1 + \frac{x\; x}{100}} \right)\; V_{A}}},{and}} \\{V_{lower} = {\left( {1 - \frac{x\; x}{100}} \right)V_{A}}}\end{matrix}$

If any phase voltage is above V_(upper) or below V_(lower) the revenuemeter will indicate a Phase Voltage Envelope Diagnostic Error.

It should be noted that in the preferred embodiment, the system 20checks, at 100, to determine whether the electrical service supported bythe revenue meter incorporating the system 20 is a three element, fourwire delta service. If so, the system calculates special case upper andlower bounds for the phase C voltage, as shown at 102.

Again, if either of the phase B or phase C voltages exceeds thepredetermined bounds, the system indicates the failure of thisdiagnostic check (at 104 or 106), indicating a diagnostic error, and theerror is recorded and the appropriate error message is displayed ashereinafter described. Otherwise, this diagnostic check is passed (at108) and this check is completed.

It should be noted, however, that in the preferred embodiment, theinitial display of this diagnostic error will not occur until the errorcondition has been present for three consecutive checks.

This diagnostic may indicate a loss of phase potential, incorrectpotential transformer ratio, shorted potential transformer windings,incorrect phase voltage, and internal meter measurement malfunction, aswell as other potential problems.

DIAGNOSTIC #3—Inactive Phase Current Check

Referring now to FIGS. 9 and 10, in performing the Inactive PhaseCurrent diagnostic, the system 20 will periodically compare theinstantaneous RMS current for each phase to a predefined minimum currentlevel, that is preferably selectable from 5 ma to 200 A in increments of1 ma. If all three phase currents are above the acceptable level, or allthree phase currents are below the acceptable level, this diagnosticwill pass. Any other combination will result in a Diagnostic #3 failure,and a Diagnostic #3 error will be indicated.

Again, however, the recording and display of this diagnostic error willpreferably not occur until the error condition has been present forthree consecutive checks.

The occurrence of a Diagnostic #3 error signifies the existence of amagnitude error with one or more of the meter phase currents. In orderto determine the specific problem, the user must obtain the phasecurrent information from Toolbox Mode, as described hereinafter.

It will be appreciated by those skilled in the art that his diagnosticcheck can be utilized to indicate any one of several potential problems,such as an open or shorted current transformer circuit.

DIAGNOSTIC #4—Per-Phase Power Factor Check

Referring to FIGS. 11-13, the Per-Phase Power Factor Diagnostic Check isdesigned to verify that, for each meter phase, the angle between thecurrent phasor and the idealized voltage phasor is within an envelopespecified by the user (±1-90°). Since this tolerance is more restrictivethan for Diagnostic #1, the system 20 does not perform this diagnosticcheck until Diagnostic #1 has passed. This diagnostic may indicate anyone of a series of potential problems, including poor load power factorconditions, poor system conditions, or malfunctioning system equipment.

The system 20 first checks the abc and cha rotation flags at 114 and116. If both of these flags are false, this indicates that Diagnostic #1has failed. Since the tolerances of this diagnostic are more restrictivethan Diagnostic #1, the diagnostic check is aborted.

If either the abc or cba flags are true (indicating that Diagnostic #1has passed), the system 20 performs the appropriate ABC or CBA rotationchecks at 114 and 116, respectively. For an ABC rotation, the systemchecks the angle between the appropriate current phasor and theidealized voltage phasor, at 118-122 to determine whether the angle iswithin an envelope specified by the user. If the angle is between thepredetermined envelope, the diagnostic is passed at 124. If not, thediagnostic is failed (at 126), indicating a Diagnostic #4 error. In theevent of a CBA rotation, the system 20 performs similar envelope checksat 128-132 for the applicable current phasor.

DIAGNOSTIC #5—Current Waveform Distortion Check

Referring to FIG. 19, the Current Waveform Distortion Check is designedto detect the presence of DC current on any of the phases. Thisdiagnostic is particularly useful on revenue meters that are designed topass only alternating current, and where performance of the currenttransformer degrades with enough direct current, since the directcurrent biases the transformer so that it operates in a nonlinearregion.

The principal way of generating direct current on a revenue meter is byplacing a half-wave rectified load in parallel with a normal load. Thepresence of the halfwave rectified current signal has the effect ofheightening either the positive or negative half cycle of the waveformwhile leaving the other one unaffected. For those revenue meters thatare not designed to pass direct current, when this signal appears at theinput of the current transformer it is level shifted so that the outputhas an average value of zero. However, the peak of the positive andnegative half cycles of the wave no longer have the same magnitude. Thedirect current detection diagnostic exploits this phenomenon by takingthe differences of the positive and negative peak values over a samplinginterval of the revenue meter. The result of the accumulation of thecurrent samples over an interval should be a value near zero if nodirect current is present. If direct current is present, then theaccumulated value will be significantly higher. This method, referred tohereinafter as the Comb Filter Method, yields accurate values regardlessof the phase and magnitude of the accompanying alternating currentwaveform.

Since the revenue meters employing the present invention are typicallypolyphase meters, meaning that there are two or three phase currentsmeasured by the revenue meter, it is possible for someone to tamper withthe revenue meter by adding a half-wave rectification circuit across theload to introduce direct current into the installation. This circuitcould be added on a single phase. For this reason, the DC detectiondiagnostic should be enabled to detect direct current on a per phasebasis.

The Comb Filter Method of calculating a direct current detection valueper phase is illustrated in the flowchart of FIG. 19. The methodinvolves the following steps during each sample interval:

(1) The sign of the first voltage sample in each interval is recorded;

(2) Using the sign of the first voltage sample, the first voltage zerocrossing is detected;

(3) Accumulate the second sample of current after the voltage zero crossover into the current peak accumulator (this is approximately 90°);

(4) Accumulate every fourth current sample after the initial currentsample into the current peak accumulator (approximately 180° apart);

(5) Repeat step 4; and

(6) At the end of the sample interval, divide the accumulated currentpeak values by the appropriate current being used during the interval.This has the effect of normalizing the result for three different gainranges that exist for the current. Also, zero the accumulator for thenext sample interval.

The result of the division in step 6 is a unitless value that isdirectly proportional to the amount of direct current present on thatphase. This value will be referred to as the DC Detection Value. The DCDetection Value is compared to a preselected Detection Threshold Valueto determine whether direct current may be present. In the preferredembodiment, the Detection Threshold Value is set to 3,000, since it hasbeen found that a value of 3,000 is a suitable threshold for both 200amp and 20 amp meters.

This diagnostic utilizes A/D sampling to ascertain the voltage andcurrent from each phase, sampled 481 times for each sample interval(typically 1 second). The current for each phase has a gain associatedwith it. This gain can change every sample interval if the magnitude ofthe current is changing fast enough. This fact is important in detectingdirect current, since the detection technique will require the summingof sampled current values over some length of time. If a time periodgreater than the sample interval is chosen, then the possibility existsthat the sum of current values includes samples taken at different gainranges, and thus the accumulated samples lose their meaning. Thus, it isimportant that the resulting accumulated current peak values benormalized by the appropriate current gain used during each interval asspecified in step (6) above.

It should be noted that the calculation of a DC Detection Value willonly occur for one phase during any single sample interval. Thus, unlikethe other diagnostics that are preferably performed by the revenue meterat least once every 5 sample intervals (typically every 5 seconds), eachof the possible three phases is checked three consecutive times, at 5second intervals, for a total sampling time of 15 seconds per phase.Thus, the total length of time required for a complete Current WaveformDistortion Check is 45 seconds (15 seconds for each of phase A, phase B,and phase C).

If the DC Detection Value is found to be greater than the selectedDetection Threshold Value for all three consecutive intervals for aparticular phase, then direct current will be recorded as present onthat phase. After all three phases have been checked, if direct currentwas recorded on any phase, then the diagnostic is turned on. When a 45second interval has passed in which no failure was found on any phase,then the diagnostic will be turned off.

It will be appreciated that the Detection Threshold Value should be setat a level that corresponds to the level of direct current for which thecurrent transformer on the revenue meter begins to degrade, so that aDiagnostic #5 failure can be detected and recorded before this level ofdirect current is reached.

Referring to FIG. 20, the diagnostic calls the Phase Check routine threetimes for each of the three phases. The Phase Check routine thenaccumulates current samples, normalizes the accumulated samples andstores the value as a DC Detection Value DV_(n), for each of threesample intervals for that phase.

Referring again to FIG. 19, the Check DIAG #5 Routine begins at 200 byclearing the interval count and each of the phase A, phase B and phase Cerror counts (PHA ERRCT, PHB ERRCT, and PHC ERRCT). The interval countermay be a modulo 9 counter that may be incremented from the value 0-8,then back to 0, etc. For each of the first three 5 second intervals(i.e., interval count=0, 1 or 2), the routine performs a Phase Check, at202, for phase A. For the next three 5 second intervals (i.e., intervalcount=3, 4, or 5), the routine performs a Phase Check, at 204, for phaseB. And, for the final three 5 second intervals (i.e., interval count=6,7, or 8), of the 45 second diagnostic cycle, the routine performs aPhase Check, at 206, for phase C.

Upon completion of each Phase Check routine for phase A, the systemdetermines, at 208, whether the DC Detection Value is greater than theDetection Threshold Value, and increments the phase A error counter(Phase A ERRCT) if the DC Detection Value is greater than the threshold.The Phase Check routine is then called three times for Phase B. Again,after each Phase Check routine is completed, the system, at 210,determines whether the DC Detection Value is greater than the DetectionThreshold Value and sets the phase B error counter (Phase B ERRCT)accordingly. The Phase Check routine is then called for phase C. Again,the system, at 212, compares the developed DC Detection Value for phaseC to the Detection Threshold Value and increments the error counter(phase C ERRCT) for phase C accordingly.

The system then determines, at 214, whether any of the phase A, phase B,or phase C error counters is equal to 3. If so, a DC current has beendetected on that phase for three consecutive sampling intervals, thesystem, at 216, notes a Diagnostic #5 failure, phase A, phase B or phaseC failure counter (PHA CHK FAILURE, PHB CHK FAILURE, or PHC CHK FAILURE,respectively), for each phase for which ERRCT=3. In any event, each ofthe PHA, PHB, and PHC CHK FAILURE counters are added to the Diagnostic#5 counter, at 218, (indicating the total accumulated number of DAIG #5failures) and the diagnostic is completed.

Thus, at the end of a 45 second sample interval, after each phase hasbeen checked three times, a Diagnostic #5 failure will be recorded ifany one of the three phase error counters has registered failures on allthree checks. The Diagnostic #5 counter (DIAG #5 ERROR COUNTER) reportedin the Tool Box mode will be a sum of the three per phase DC detectioncounters.

Automatic Service Sensing

In one embodiment of the invention, the system includes logic forautomatically determining the electrical service supported by therevenue meter based upon the pre-programmed form factor of the revenuemeter and the angular displacement of voltage vectors V_(a) and V_(c).This capability eliminates the need for the customer to program theelectrical service type into the revenue meter in advance ofinstallation and, thereby, allows the customer to take full advantage ofthe flexible, multi-service capability of the revenue meter and reducethe customer's revenue meter inventory requirements. In addition, theautomatic electrical service sensing capability ensures that the revenuemeter and any of the enabled system and installation diagnostics willoperate correctly upon installation with minimal preprogramming.Finally, the auto-service sensing capability allows for reinstallationof a revenue meter from one electrical service to another without theneed to pre-program the change in the type of electrical servicesupported by the revenue meter.

Referring to FIG. 21, in one embodiment, the system includes anautomatic electrical service sensing capability for those revenue metersthat have been preprogrammed as forms 5S, 6S, 9S, 12S, 16S, 26S, 5A, 6A,8A, and 10A. Each of the different services within one of the formgroups shown in FIG. 21 has a unique balanced resistance load phasordiagram that shows the angular location of each of the individual phasecurrent and voltages with respect to A phase voltage. In a real worldapplication, the current phasors will be removed from these balancedresistance load locations because of varying loads. However, the voltagephasors do not vary with load and should be within one or two degrees oftheir balanced resistive load locations. Since the B phase voltagephasor will not be present on the two element revenue meters, nor on the6S (6A) meter, this voltage is contrived. However, the phase C voltagephasor is present on all of the different forms and services and ismeasured with respect to the phase A voltage. Thus, for the form metersidentified in FIG. 21, a check of the phase C voltage phasors angularlocation relative to the A voltage phasor will alone provide theinformation necessary to determine what service the revenue meter is in.

The lone exception to this rule is that network and four-wire WYEservice cannot be distinguished on the 5S, 5A, 26S form group by simplyexamining the phase C and phase A voltage phasor locations. In theembodiment of the system described herein, the system simply assumes afour-wire WYE service under these conditions.

Thus, as shown in FIG. 21, if the form factor of the revenue meter isknown, the type of electrical service can often be determined bymeasuring the angular displacement of the voltage factors. Inparticular, each of meter forms 8A, 10A, 9S and 16S supports thefour-wire WYE and four-wire Delta electrical services. Since thedisplacement of the voltage phasors V_(a) and V_(c) in four-wire WYE andfour-wire Delta systems is different (120° and 90°, respectively, for anABC rotation), the system, after a suitable time lag after start-up toensure valid angular measurements for the phasors calculated by thesystem, determines the displacement between the V_(A) and V_(C) voltagephasors and, based upon that displacement, determines whether therevenue meter is installed in a four-wire WYE or a four-wire Deltasystem.

Similarly, for meter forms 6S or 6A, the system determines whether thedisplacement of the V_(a) and V_(c) phasors is within an acceptablerange from 120°, preferably plus or minus 10°, to ensure that therevenue meter is installed in the appropriate four-wire WYE electricalservice that it supports. For 12S meters, the system determines whetherthe angle of the V_(a) and V_(c) phasors is within an acceptablethreshold of 60°, 120°, or 180° and, if so, determines that the revenuemeter has been installed, respectively, in a three-wire Delta, network,or Single phase electrical service. Finally, for 5S, 5A, and 26S forms,the system examines the V_(a), and V_(c), phasors to determine whethertheir angle falls within acceptable thresholds for each of thethree-wire Delta (60°), four-wire Delta (90°), or four-wire WYE (120°)services and, if so, records the corresponding electrical service type.

It should be noted that in the case of the 5S, 5A, and 26S forms, thesystem cannot distinguish between four-wire WYE and Network services,since the angle between V_(a) and V_(c) phasors for both of theseservices is 120° in the ABC rotation. Since, however, not many utilitiescurrently use the 5S in a Network service, in one embodiment, the systemmerely assumes that a 120° V_(a)/V_(c) angular displacement is afour-wire WYE electrical system. It will be appreciated that if therevenue meter is actually being used in a Network service, the revenuemeter will still function correctly despite a determination by theauto-service sensing capability that the revenue meter is installed in afour-wire WYE network. However, since there is a 30° phase shift betweencurrent (I) and voltage (V) in the four-wire WYE and since the currentand voltage phasors in the Network service are not shifted relative toeach other, some diagnostic calculations, such as diagnostics 1 and 4described herein, may falsely indicate errors if a 5S, 5A or 26S formmeter including the above-described automatic electrical service sensingcapability is used in a Network service.

It will be appreciated that the system may similarly be implemented toautomatically sense the electrical service in which other form metersare installed, either by examining the voltage phasors, and/or otherinformation acquired through the automatic system diagnostics.

It should also be noted that the angular displacements illustrated inFIG. 21 are for ABC sequencing. The system also preferably, checks theV_(a) and V_(c) angular displacement values for ABC rotations in makingthe electrical service determination. It will be appreciated that in aCBA rotation, the phase C voltage phasor, V_(c), would be 360° minus theV_(c) location illustrated in FIG. 21.

FIGS. 22 and 23 illustrate a flowchart of the automatic service checkingfunction employed in one embodiment of the present invention. Each timethe revenue meter is powered-up, or whenever the system diagnostics arereconfigured, the revenue meter will perform the system checking servicefunction. This may be triggered by initializing the service type to aninvalid value. The system, on start-up, or reconfiguration after, forexample, a power outage, will then recognize the invalid value andautomatically begin determination of a valid service type.

A diagnostic delay is set for a predetermined period, preferably about 8seconds for a revenue meter operating at 60 Hz, to allow the revenuemeter to settle and for valid angular measurements for the five possiblephasors to be calculated. The automatic service sensing function doesnot, therefore, execute while this delay is active, since the V_(a) andV_(c) phasor values may be unreliable. After lapse of the diagnosticdelay period, the automatic service sensing function is activated at theend of each sample interval (one second for 60 Hz) until a valid serviceis found. If a valid service is not found and any diagnostics have beenenabled in the system, the failure to determine a valid service will berecorded as a diagnostic #1 failure. If no diagnostics are enabled, theinvalid service error will not be recorded. In one embodiment of thesystem employing the automatic service sensing function, the diagnostic#1 error for an invalid service is not reported on the display unlessdiagnostic #1 is enabled to scroll or lock as described herein.

As long as a valid service is not found, the diagnostics will not bechecked. Once a valid service is determined, the type of servicesrecorded in the system, the automatic service sensing ceases, and therevenue meter begins doing diagnostic checks during each sampleinterval, as described hereinafter, for those system diagnostics thathave been enabled.

It should be noted that in one embodiment of the present invention, theoperation of the diagnostic #1 failure when a service detection failureoccurs is slightly different than the normal diagnostic #1 failure. Ifthe service is not found immediately on the first check, then adiagnostic #1 failure is activated, provided at least one of the systemdiagnostics capabilities are enabled in the system. As soon as a validservice is found, the diagnostic #1 error will be immediately cleared.The failure will only be displayed on the revenue meter if diagnostic #1is enabled to scroll or lock. The failure is always recorded on thediagnostic #1 error counter, provided that one of the system diagnosticsis enabled. If none of the system diagnostics are enabled, then thefailure will not be recorded. This allows, the customer an option ofshutting off any warning.

It should be noted that, in the implementation shown in FIGS. 22 and 23,the system allows a tolerance, preferably plus or minus 10°, for thelocation of the voltage phasors in order to pass the diagnostic. Thistolerance has been found to be adequate in light of the limited varianceof the voltage phasors, typically within one or two degrees of theirbalanced resistive load locations, in field operation.

User Definition of Diagnostics

The system preferably allows the user to enable or disable theperformance of any one or more of the system diagnostics duringinstallation of the revenue meter. If the diagnostics are implemented,the system also provides for user-defined parameters, preferably asdescribed below.

To activate or deactivate any of the above described diagnostics checks,the user must respond to the following types of prompts in theprogramming software for each diagnostic check supported by the system:

-   -   “DIAGNOSTIC #N DISABLE”

For each “Diagnostic N” (where N represents one of the diagnosticnumbers 1-4), the user, upon pressing the return key, gets a menu,preferably including the following options:

Disable

Ignore

Lock

Scroll

The Disable option disables the implementation of that diagnostic.

The Ignore option, if implemented, means that the diagnostic will affectthe error condition alert (as hereinafter described), but will not bedisplayed.

The Lock option, if implemented, will cause the revenue meter's displayto lock on the diagnostic error message in the event a diagnostic erroris determined.

The Scroll option, if implemented, will cause a diagnostic error messageto be displayed, when discovered, during the “off time” between eachnormal mode meter display item.

In addition to the above prompt, the user will be prompted to programthe electrical service type (e.g., 4-wire WYE) supported by theparticular meter installation.

For Diagnostic #2, the user will also be prompted to program thetolerance for all voltages by inserting a number (preferablycorresponding to the percent tolerance) in response to the followingprompt:

-   -   DIAGNOSTIC #2 PERCENT TOLERANCE: ______

For a Diagnostic #3, the user will preferably be prompted to program anacceptable minimum current level in response to the following prompt:

-   -   DIAGNOSTIC #3 MINIMUM CURRENT: ______

Diagnostic #4 preferably also prompts the user to program the allowableangle difference by inserting a number (1-90°) in response to thefollowing prompt:

-   -   DIAGNOSTIC #4 TOLERANCE ANGLE: ______

If either the Lock or Scroll option was selected, the revenue meter willdisplay the following message as soon as a diagnostic error is detected:

-   -   Er DIAG N (where N=the Diagnostic #)

Also, the Number of Occurrences of this Error Counter is incremented byone whenever the error is detected. As previously mentioned, however, inthe preferred embodiment the system acknowledgment and initial displayof a diagnostic error will not occur until the error condition has beenpresent for three consecutive checks. Likewise, the error will not becleared from the display until it has been absent for two consecutivechecks.

Again, depending on how the system is programmed at installation, thedisplay will either lock on the error message, or scroll the errormessage by displaying it during the “off time” between each normal modemeter display item. Various other error display regimes may be adoptedconsistent with the teachings of the present invention.

Meter Self-Checks

The system 20 of the present invention is also preferably suitablyprogrammed to periodically perform a series of meter self-checks and, ifany errors are detected, the system will record the existence of anerror condition, display an error code corresponding to the type oferror detected, and, depending upon the type of error, take othersuitable action.

The system preferably implements a series of routines that periodicallycheck for fatal errors and non-fatal errors. Errors are classified asfatal where the detected failure may have corrupted billing data orwhere the detected failure may cause the revenue meter to operateunreliably in the future. The system 20 preferably conducts meterself-checks of the internal RAM of the meter's register module, the ROMof the register module, the EEPROM of the register module, a spuriousRESET of the register module, and the internal RAM, ROM and EEPROM ofthe front-end module. These meter components are preferably checkedwhenever power is restored to the revenue meter following an outage orotherwise when the revenue meter is reconfigured. If a RAM, ROM, EEPROM,front module processor error, or other fatal error, is detected, thesystem 20 will display a predetermined error code corresponding to thedetected error, lock the display on the error code until the revenuemeter is reinitialized, and cease all meter function exceptcommunications.

The system 20 checks for a power-down error by determining if theregister module processor has encountered a hardware RESET without firstgoing through a predetermined power outage routine. This event mayoccur, if a transient on the power line asserts the RESET linemomentarily. One method of checking for a spurious RESET is to write aspecial byte to the register EEPROM as the last step in handling anoutage. If this special byte is not present on power-up, a spuriousRESET has occurred. The system 20 will then display the power-down errorcode and cease all meter functions except communications.

The system similarly checks for RAM, ROM, EEPROM, and processor failuresin the front-end module, as described above. In the embodimentintegrated in the revenue meter of FIG. 3, the front-end module willstop communicating with the register module if any front-end modulefatal errors are discovered. If the front-end module fails tocommunicate with the register module for over five seconds, it ispresumed that one of these errors has been detected, the front-endprocessor failure error code is displayed, and the 68HC11 RESET line isasserted until the front-end module resumes normal operation.

The meter self-checks implemented by the system also preferably includea series of non-fatal errors, such as register full scale overflow,system clock, time of use (TOU), mass memory, reverse power flow, andlow battery error conditions.

For example, a register full scale overflow error will be reported ifthe peak Kw register exceeds a pre-programmed register full scale value.If this event is detected, the system displays a register full scaleoverflow error, which error will be cleared when the revenue meter isreset or when the error is cleared by a predefined programming device.

A clock error will be reported if the minute, hour, date or month dataare out of a predefined range. If a clock error occurs, the TOU and massmemory options will be disabled and will cease recording interval datauntil the revenue meter is reconfigured.

A TOU error will be reported if an internal TOU parameter becomescorrupted and contains a value outside of its predefined accepted range.If a TOU error occurs, the appropriate error code will be displayed andthe TOU option will be disabled.

A mass memory error will be reported if an internal mass memoryparameter becomes corrupted or is out of its predefined acceptablerange. If a mass memory error occurs, the appropriate error code will bedisplayed and the mass memory option will be disabled.

A reverse power flow error will be reported if the front-end moduledetects the equivalent of one complete and continuous disk revolution inthe reverse direction. This error will be reported regardless of whetherenergy is detented or undetented.

A low battery error will be reported if the LOBAT signal on the power,supply integrated circuit is asserted when its level is checked. If alow battery error is detected, the appropriate error code will bedisplayed and, as with a clock error, all TOU and mass memory optionswill be disabled. If the battery is replaced prior to any power outage,the low battery error will be cleared when the battery voltage risesabove a predefined threshold value. However, if the battery voltage wasbelow the threshold when a power outage occurred, the revenue meter mustbe reconfigured to clear this error.

The system also preferably checks for register full scale overflows atthe end of each demand interval, and preferably checks for clock, TOUand mass memory errors at power up, 2300 hours, and on any type of meterreconfiguration. The reverse power flow error is preferably checked bythe system each second, and the low battery error is checked on power upand once each interval.

In the preferred embodiment of the system 20, the system allows the userto select which of the meter self-checks will be implemented. In thepreferred embodiment, if any one of the selected non-fatal errors isdetected, the system will display a predetermined error codecorresponding to the detected error during the off-time between normaldisplay item. Alternatively, the system may allow for the user toprogram the system to lock the display on the error code of any-nonfatalerror, once any such error is detected. In this event, activation of aswitch by the user will cause the revenue meter to scroll through thenormal display list one time and then lock back on the non-fatal errordisplay.

It should be noted that, in the preferred embodiment, fatal error checkscannot be disabled. If any nonfatal error is not selected, it will notbe displayed or flagged.

It will be appreciated by those skilled in the art that various displayregimes may be implemented. For example, the system may be programmed tolock the display on the error code corresponding to any non-fatal errordetected until a magnetic switch is activated. Upon activation of themagnetic switch, the system may then scroll through its normal display,then lock back on the display of the non-fatal error code.Alternatively, the system could be programmed to continue to scrollthrough a predefined display list, periodically displaying any and allnon-fatal error codes.

Other meter components may similarly be periodically checked usingconventional means and assigned error codes that may be displayed whenappropriate to alert the user of possible data corruption or unreliableoperation of the revenue meter.

Toolbox Mode

The Diagnostics Toolbox is a fixed selected set of display itemspreferably in the format illustrated in FIG. 14. In the preferredembodiment, the Toolbox display is accessed via a magnetic reed switchthat is located at the 12 o'clock position on the meter board, and isactivated by keeping a magnet next to the reed switch for at least 5seconds. This may be accomplished by the user by placing a magnet on topof the meter.

When accessed, the Toolbox display items are each displayed individuallyas shown and in the sequence indicated in FIG. 14. Once the meter is inToolbox display mode, it will scroll through all of the Toolbox displayitems at least one time. When the magnet is removed, the meter willfinish scrolling to the end of the Toolbox display list and then revertto Normal mode operation. The TEST annunciator will flash two times persecond during the entire time the meter is in Toolbox mode.

All of the # DIAG Error counters are preferably cleared by an externaldevice, such as by a handheld personal computer, or through normalcommunications. In the preferred embodiment, the maximum value of eachcounter is 255.

While the meter is in Toolbox mode, it continues to perform meteroperations as usual. This assures that revenue meter operation is notaffected even if the magnet is left on top of the revenue meter for anextended period of time. The system continually updates the displayedToolbox quantities as they change in value during the entire time therevenue meter is in Toolbox mode.

While in Toolbox mode, the Watt Disk Emulator scrolls at the rate of onerevolution per 1.33 seconds in the direction of power flow of the phasefor which information is being displayed at that point in time. Forexample, while A phase voltage, current, voltage angle and current angleare being displayed, the Watt Disk Emulator scrolls once per second inthe direction of power flow of phase A. As soon as the phase B values(if present) are displayed, the Watt Disk Emulator reverses direction ifthe power flow in B phase is opposite that of A phase. The Watt DiskEmulator is turned off while the four diagnostic error counters aredisplayed.

Because continuous potential indication is required by the customer,three potential indicators, preferably labeled V_(A), V_(B) and V_(C),are present on the display. These indicators are “ON” as long as thecorresponding voltage is above the predefined threshold. The thresholdis preferably defined as 75% of the lowest voltage at which the revenuemeter is rated to operate. If any voltage drops below the threshold, itsindicator will flash, preferably at a rate of two times per second.

When more than one error exists at the same time, the informationrelating to only one of the errors is displayed, based upon a predefinedpriority. The following priorities are established in the preferredembodiment of the system:

-   -   1. Meter Self-check errors take priority over System and        Installation Diagnostic errors.    -   2. Since only one System and Installation Diagnostic error can        be displayed at a time, the highest priority error will be the        one that is displayed using a pre-defined priority list.

If two or more System and Installation Diagnostic errors exist, thehighest priority error will be the one that is displayed and the onethat triggers the output contact closure. If this error is thenremedied, the next highest priority error that still exists will then bedisplayed and will again trigger the output contact closure. The outputcontact closure (Error Condition Alert) thus remains asserted as long asone or more of the diagnostic errors have been triggered.

As described above and illustrated in FIG. 14, the Toolbox display alsopreferably displays the instantaneous value of the current and voltagefor each phase, and their phase relationship to the voltage on phase A.With this information, the user can construct a phasor diagram thatassists in determining the correct installation and operation of therevenue meter. This display also shows the number of diagnostic errorsaccumulated for each diagnostic since the last time the system wascleared.

An example of the desired relationship between a phasor diagram for athree phase revenue meter installation and a Toolbox display is shown inFIGS. 14 and 15, respectively. With the phase current, voltage and angleinformation given in the Toolbox display, the user should be able toconstruct a phasor diagram as shown in FIG. 15. This will allow the userto get a snapshot of the power system status, and to identify anypeculiarities or errors. As mentioned before, the Toolbox display willalso give the status of the four diagnostic counters that will providethe user with more detailed status information for the system.

Calculation of Phase Angles

In the preferred embodiment, the angle information for phase current andvoltages utilized in system Diagnostics #1 and #4, and required fordisplay in the Toolbox display, are determined from accumulated currentand voltage values for each phase, as well as the accumulated products,Q and Y (as hereinafter defined). The voltage on phase A is preferablyused as the reference (or base phasor) for the other angles. The phase Avoltage angle will thus appear as 0.0° in the display. The five otherangle values for (I_(A), I_(B), I_(C), V_(B), V_(C)) will be reportedwith respect to the voltage on phase A, and will always be given withrespect to a lagging reference.

1. The Phase Angle between V_(A) and I_(A)

If the Power and Apparent Power are known, the Power Factor can bederived.

The relationship is as follows:

$\begin{matrix}{{{Apparent}\mspace{14mu}{Power}} = {I_{RMS}V_{RMS}}} \\{{PowerFactor} = {\frac{Power}{ApparentPower} = \frac{Power}{I_{RMS}V_{RMS}}}}\end{matrix}$

The phase angle (□) between voltage and current can then be calculatedas follows:Θ=arc cos(Power Factor)

The device of the present invention can also determine whether thecurrent is leading or lagging the voltage by examining the sign of thereactive power. If the reactive power is positive, then the current islagging the voltage, and if the reactive power is negative, then thecurrent is leading the voltage.

In the preferred embodiment, the power, RMS voltage, and RMS current arecalculated every 60 line cycles for each phase on the meter. This isaccomplished by taking 481 samples of the voltage and current over a 60cycle period. The necessary multiplications and accumulations are done,and then these values are averaged to yield the power, RMS voltage, andRMS current for a given 60 line cycles. These quantities are then usedat the end of each 60 line cycle to calculate a power factor for eachphase.

The reactive power can be calculated much the same way as the power,except that a 90 degree phase shift must be induced between the currentand voltage measurements. This phase shift can be achieved by taking thepresent current sample and multiplying it by a delayed voltage sample(stored in memory) corresponding to a 90 degree phase shift.

2. Derivation of a Generalized Phase Angle Calculation Method

As demonstrated below, the method of calculating the phase angle ofV_(A) to I_(A) can be generalized to calculate the angle between anyreference phasor (such as V_(A)) and any other phasors (such as V_(B),I_(B), V_(C), or I_(C)).

Referring now to FIG. 16, consider two sinusoidal waves of the samefrequency, different magnitude, and phase shifted one from another asfollows:a(t)=A cos(ωt)b(t)=B cos(ωt−θ).

By representing the cosine argument as (ωt−□), the implicit assumptionis that □ represents a lagging phase shift from reference a(t) to b(t).The respective position refers to whether b(t) reaches its maximum valuebefore or after a(t) with respect to time. If b(t) reaches a maximumafter a (t), then it is said to lag a(t). If b(t) reaches a maximumbefore a(t), then it is said to lead a(t).

In order to isolate the phase angle □, the average value of the productof the two sine waves will be evaluated. This average value will bedenoted by Q. The equation for the average value is as follows:

$Q = {\frac{1}{T}{\int_{0}^{T}{A\;{\cos\left( {\omega\; t} \right)}\; B\;{\cos\left( {{\omega\; t} - \Theta} \right)}\mspace{11mu}{{\mathbb{d}t}.}}}}$where A and B represent the amplitudes of sinusoidal waves a(t) and b(t)respectively. The amplitude, X_(MAX) of a sinusoidal wave is related tothe RMS value, X_(RMS), by the following relationshipX _(MAX)=√{square root over (2)}X _(RMS)Therefore,A=√{square root over (2)}A _(RMS);andB=√{square root over (2)}B _(RMS).

Substituting these relationships into the equation for Q, the equationbecomes:

$\begin{matrix}{Q = {A_{RMS}B_{RMS}\mspace{11mu}\cos\mspace{11mu}\Theta}} \\{{or},} \\{{\cos(\theta)} = \frac{Q}{A_{RMS}B_{RMS}}} \\{{{and}\mspace{14mu}{finally}},} \\{\theta = {{{arcos}\left( \frac{Q}{A_{RMS}B_{RMS}} \right)}.}}\end{matrix}$

Therefore, if the average value of the product of two sine waves and theRMS values of the two individual waves is known, then the angle betweenthe two waves can be calculated. This information alone will not allowus to determine whether b(t) is lagging or leading a(t). However, if thesine of the angle □ were known, then whether the angle was a leading orlagging angle could be determined.

In order to determine the sine of the angle, consider the average valueof the products of two sinusoidal waves, where a(t) is shifted by 90degrees or Π/2 radians. An expression for the shifted version of a(t) isas follows:

${\hat{a}(t)} = {A\;{{\cos\left( {{\omega\; t} - \frac{\pi}{2}} \right)}.}}$

The average value of the product of a (t) and b(t) will be referred toas quantity Y. The equation is as follows:

$Y = {\frac{1}{T}\;{\int_{0}^{T}{A\;{\cos\left( {{\omega\; t} - \frac{\pi}{2}} \right)}\mspace{11mu} B\;{\cos\left( {{\omega\; t} - \theta} \right)}\;{{\mathbb{d}t}.}}}}$

Solving the integral yields the following relationship:

$Y = {\frac{A\; B}{2}\mspace{11mu}{{\sin(\theta)}.}}$

Therefore, if the average value of the product of the two sine waves (Q)is known, the average value of the product of the sine waves with thereference wave delay shifted by 90 degrees (Y) is known, and the RMSvalue for each of the waves is known, then the phase angle can becalculated and a determination made whether the unreferenced wave islagging or leading the reference wave. The two equations that can beused to determine the magnitude of the phase angles are as follows:

$\begin{matrix}{\theta = {{arcos}\left( \frac{Q}{A_{RMS}B_{RMS}} \right)}} \\{\theta = {{\arcsin\left( \frac{Y}{A_{RMS}B_{RMS}} \right)}.}}\end{matrix}$

Whether the angle is leading or lagging can be evaluated by examiningthe signs of the arccosine and arcsine arguments. Since a positive anglecorresponds to a lagging angle, then the following is true fordetermining whether the angle is leading or lagging:

Arccosine argument(+), arcsine argument (+)—Lagging between 0 and 90degrees;

Arccosine argument (−), arcsine argument (+)—Lagging between 90 and 180degrees;

Arccosine argument (−), arcsine argument (−)—Leading between 90 and 180degrees; and

Arccosine argument (+), arcsine argument (−)—Leading between 0 and 90degrees.

Therefore, if Q, Y, and RMS values for a(t) and b(t) are available thenthe phase angle between these sinusoidal waves can be determined.

The above-described technique for finding the phase angle will thusapply to any pair of voltages or currents. For instance, to determinethe angle between V_(B) and V_(A), the two required quantities that willhave to be calculated are the average value of the product of two waves(Q_(VAB)), and the average value of the product of the two waves withV_(A) shifted by 90 degrees (Y_(VAB)).

As previously mentioned, the revenue meter incorporating the preferredembodiment of the system 20 samples V_(A) and V_(B) 481 times every 60line cycles. If the product of V_(A) and V_(B) is calculated for each ofthe 481 samples and accumulated over a sample interval, then at the endof the sample interval the average value of the product of the twowaves, Q_(VAB), can be calculated. The equation for Q_(VAB) is asfollows:

${Q_{VAB} = {C\frac{\sum\limits_{n = 1}^{481}{V_{A{(n)}} \times V_{B{(n)}}}}{481}}},$where C is a calibration scaling factor used to compensate for thereduction of the phase voltages to a measurable level.

Y_(VAB) can be found in a similar fashion from:

$Y_{VAB} = {C\frac{\sum\limits_{n = 1}^{481}{V_{A{({n - 2})}} \times V_{B{(n)}}}}{481}}$

where the C for the Y_(VAB) calculation is the same as the C for theQ_(VAB) calculation and V_(A(n−2)) is the voltage V_(A) two samplesprevious to the sample, V_(A(n)).

The sampling is designed so that two consecutive samples of a signal are44.91 degrees apart. Therefore, if the voltage sample from the twosamples ago is taken, this will result in a phase shift of 89.82 degreesthat is approximately 90 degrees.

It should be noted that instead of using shifting samples of V_(A), theother quantities could be shifted by 90° to calculate the phase angle.This will result in the same results for the magnitude of the Y value.However, this will change the sign information because the phase angleis shifted by 180°. With this implementation, the following signrelationships between the arcsine and arccosine arguments exists:

Arccos(+), arcsine (−)—Lagging angle between 0 and 90 degrees;

Arccos (−), arcsine (−)—Lagging angle between 90 and 180 degrees;

Arccos(−), arcsine (+)—Leading angle between 90 and 180 degrees; and

Arccos(+), arcsine—Leading angle between 0 and 90 degrees.

If the new values were to be calculated every sample interval for thephase angles needed for the Toolbox display, then the ten product andaccumulation terms shown above would have to be calculated every sampleinterval. Due to the excessive use of processor time and RAM required toaccumulate all ten terms every sample interval, only one pair of termsis preferably considered for each sample interval. This limits the useof processor time and RAM, and it makes new phase angle values availablefor the Toolbox display every five sample intervals.

In the preferred embodiment, the product terms are calculated andaccumulated in the following order:

1. First sample interval—V_(A)*, I_(A) and V_(A(−90°)), *I_(A) for phaseangle I_(A);

2. Second sample interval—V_(A)*I_(B) and V_(A(−90°))*I_(B) for phaseangle I_(B);

3. Third sample interval—V_(A)*I_(C) and V_(A(−90°))*I_(C) for phaseangle I_(C);

4. Fourth sample interval—V_(A)*V_(B) and V_(A(−90°))*V_(B) for phaseangle V_(B); and

5. Fifth sample interval—V_(A)*V_(C) and V_(A(−90°))*V_(C) for phaseangle V_(C).

After the fifth sample interval, the sequence begins again, accumulatingthe necessary Q and Y values for phase angle I_(A). The samples forV_(A) are stored during each sample interval. This thus requires thattwo additional values be stored for V_(A) at each interval, the twoprevious V_(A).

In the preferred embodiment, these functions are implemented in 68HC11assembly code. The multiplication and accumulation of these productterms occurs in the front-end sampling interrupt routine. The voltagevalues are 8-bit values and the current values are 12-bit values. SinceV_(A) is always involved in any of the multiplications, this will meansome of the multiplies will be 8×8 bit and some will be 8×12 bit. Sinceit is desirable to use the same algorithm to do all the multiplications,the 8-bit values are extended to 12-bit values such that an 8×12 bitmultiplication algorithm is used exclusively in the preferredembodiment.

The 8-bit voltage values for V_(B) and V_(C) are sign extended to 12-bitvalues so that all the multiplication and accumulation of product termsfor finding the phase angles are handled by two algorithms, one for theaccumulation of product terms for the Y value and one for theaccumulation of product terms of the Q value. The sign extension ofvoltage values V_(B) and V_(C) are performed during every sample period.This makes special checks unnecessary for identifying the sampleintervals in which these quantities are needed, because they areavailable during every sample interval.

All 12-bit values for current and voltages are preferably stored in16-bit registers in the memory, because the memory is segmented intobyte boundaries.

The front-end sampling routine must have a way of identifying whichproduct term is to be calculated at each sample interval. A counteridentifier is preferably utilized as an index to access the correctvalue for the multiplications necessary in the accumulation of the Q andY values.

In order to accumulate the two product terms, two accumulators are setaside in the memory map. The size of each of these accumulators is thesame, since both are doing 8×12 bit multiplies. The largest possibleaccumulated value is as follows:

Largest 8 bit value=128

Largest 12 bit value=2048

Largest accumulated result 481*128*2048=07 84 00 00(hex)

Therefore, each accumulator is four bytes long to accommodate the worstcase result. Two four-byte accumulators are therefore set aside toaccumulate each pair of product terms for each sample interval.

At the end of each sample interval, the results in the two four-byteaccumulators are stored in two four-byte holding areas to awaitprocessing by the background routines necessary in completing the anglecalculation during the next interval.

Once the accumulated pairs have been transferred to the holdingregisters at the end of a sample interval, then the remainingcalculations needed to determine the phase angle take place during thenext sampling interval in the background, while the accumulation for thenext pair is taking place in the foreground. These background routinesmust also have a way of determining on which pair of accumulated productterms they are working. A separate counter identifier is used for thesebackground routines that operates in a similar fashion to the counteridentifier for the front-end sampling interrupt. However, it is possibleto use the same counter, since this identifier will always be one countbehind the counter identifier for the front-end module samplinginterrupt routine.

The revenue meter 34 illustrated in FIGS. 2, 3, 17A-B and 18A-B, intowhich the system 20 of the present invention is preferably integrated,is a solid state single function KW/Kwh revenue meter utilizing digitalsampling techniques to provide conventional Kw/Kwh demand, time of use,and other conventional real time billing information in addition to thediagnostic information generated by the system 20 of the presentinvention. The revenue meter 34 is preferably programmed using softwarethat runs on an IBM compatible personal computer using the MS-DOSoperating system. This software includes the logic for prompting theuser to provide meter configuration parameters and preferably includesthe installation prompts that provide for user-defined parameters forthe diagnostics supported by the system 20 of the present invention, sothat a hand-held personal computer can be plugged into a communicationsport on the revenue meter to program the revenue meter at installation.

FIGS. 17A-B illustrate the front-end module 44 of the revenue meter 34into which the system 20 of the present invention is preferablyincorporated. The front-end module 44 preferably includes a MotorolaMC68HC11KA4 microprocessor 140 running in single chip mode, an integral8-bit A/D converter 142, which serves as the voltage converter 26 in thesystem 20 of the present invention, 24K bytes read only memory (ROM),640 bytes electrically erasable programmable read only memory (EEPROM),and 768 bytes random access memory (RAM), all shown at 144. The ROM andEEPROM include the diagnostic logic, and the RAM serves as storagememory for the present invention. An external 12 bit A/D converter,shown at 146 serves as the current A/D converter 28 for the system 20 ofthe present invention.

An additional error condition alert function may be implemented as anoption on the front-end module 44. This function utilizes a line out to,for example, an external communication device, that can be activatedwhenever an error condition is determined. This optional function may beutilized by the system 20 of the present invention for activating andcommunicating the existence of error conditions for any one of thediagnostics performed by the system 20 of the present invention.

An option board 146 may be incorporated into the front-end module 44 toprovide various signals to the outside world. For example, the errorcondition alert may be assigned to a low current solid-state orMercury-wetted relay to indicate when one or more diagnostic errors havebeen determined. Other known ancillary functions, such as automatedmeter reading or real time billing, may be implemented on option board146, or on a similarly configured option board utilized with thefront-end module 44.

Referring now to FIGS. 18A-B, the register module 48 of the revenuemeter 34 into which the system 20 of the present invention is preferablyincorporated, includes a NECuPD75316GF single chip microprocessor 148,including 16K bytes of ROM, shown at 150, 512×4 bits of RAM, shown at152, and a 96 segment LCD display driver 154, suitable for driving anLCD display 156 such as the particular type of display 33 shown in FIG.3 and utilized in the preferred embodiment of the revenue meter 34.

Serial data will be transferred between the front-end module 44 and theregister module 48 via a four wire synchronous serial data link shownrespectively at 158 in FIGS. 17A-B and 160 in FIGS. 18A-B. The front-endmodule will monitor and update the status of all of the diagnosticsperformed by the system 20 of the present invention and, periodically(preferably once per second) communicate these statuses to the registermodule 48 via the above-described serial communications link fordisplay, as well as for storage of volatile data in the event of a poweroutage. In addition, any instantaneous quantity required for display inthe Toolbox display of the present invention, will be communicated bythe front-end module as needed to the register module. The front-endmodule 44 also communicates various other conventional meter informationto the register module 48, such as the amount of energy (in Kwh)registered for the past 60 line cycles, as well as its direction(delivered or received), present demand and end-of-interval information.

Information that may be communicated from the register module 48 to thefront-end module 44, typically includes periodic meter register statusinformation.

Referring again to FIGS. 17A-B, the front end module 44 enables themeasurement of per phase voltage, current and watts for one sampleinterval (60 line cycles). As previously described, the front-end modulepreferably performs 481 samples per 60 line cycles, that corresponds to481 Hz when the line frequency is 60 Hz, and approximately 401 Hz whenthe line frequency is 50 Hz. The sampling frequency is recalculatedevery 60 cycles, based on the measured line frequency. As previouslydescribed, the diagnostic functions of the present invention, includingdetermination of instantaneous per phase current, voltage, watts andphase angle, are preferably performed by the front end module 44 whenthe system is incorporated in a revenue meter of the type shown in FIG.3.

Referring again to FIGS. 3 and 18A-B, the register module 48 preferablyperforms the function of driving the LCD display 33 in the revenue meter34. As previously described, the Toolbox display of the presentinvention may be implemented by activating an alternate display switch(not shown) for a predefined period. When activated, the Toolbox displaymode is activated and the display will scroll through the Toolboxdisplay list as previously described herein. During a Toolbox display,the “TEST” icon preferably flashes continuously, and the watt diskemulator, shown as the five rectangular icons at the bottom of thedisplay 33, will scroll at a rate of about one revolution per 1.33seconds. The direction of the watt disk emulator will be the same as thedirection of power flow for the phase being displayed (left to right ifreceived, right to left if delivered). The revenue meter will leave theToolbox display mode when the end of the display is reached and thealternate display switch is no longer activated. It should be noted, aspreviously described, the revenue meter will continue to perform allnormal mode meter operations while the Toolbox display sequence isactive.

When the alternate display switch is not activated, the meter display 33operates in normal display mode for the revenue meter 34.

Communication to or from the revenue meter may also be accomplishedthrough the front-end module 44 via connection to the optical port 162.

Thus, the integral electronic revenue meter system diagnostic package ofthe present invention provides the capability for continuousself-checking of the internal components of the revenue meter, as wellas alert field personnel to any discovered error, without interruptionof the revenue meter's operation. The system also provides thecapability for constant system diagnostic checks, and display of thosediagnostic results, to provide pertinent diagnostic data to systempersonnel during or following installation of the revenue meter.

The system provides the flexibility of allowing the user to program thesystem to select and define the functions and parameters suitable to theparticular service supported by the meter installation.

Finally, the Toolbox display capability of the present invention allowsfor periodic display of valuable information respecting the internalfunctioning of the revenue meter as well as the character of the servicesupported by the meter, again without interruption of normal service andmeter operation.

While the best mode for carrying out the invention has been described indetail, those familiar with the art to which this invention relates willrecognize various alternative designs and embodiments for practicing theinvention as defined by the following claims.

1. An apparatus for electronically measuring or distributing electricalenergy, said apparatus comprising: at least one analog-to-digitalconverter connected to phases of an electrical service, said converterconfigured to obtain digital samples of the voltage component and thecurrent component of said electrical service; memory for storingreference information for at least one type of electrical service; amicroprocessor interfaced with said at least one analog-to-digitalconverter and said memory; and wherein said microprocessor is configuredto calculate a voltage phase angle value relative to a base voltagephase for the voltage component for at least one phase of saidelectrical service by use of said digital samples.
 2. An apparatus as inclaim 1, wherein said apparatus is a revenue meter configured to attachto a meter socket on a substantially permanent basis.
 3. An apparatus asin claim 1, said apparatus operative without modification for at leastthree standard electrical service voltages, wherein said standardelectrical service voltages are selected from the group consisting of120 Vrms, 208 Vrms, 240 Vrms, 272 Vrms and 480 Vrms.
 4. An apparatus asin claim 1, said apparatus operative for electrical service voltagesinclusive of the entire range from about 98 Vrms to about 528 Vrms. 5.An apparatus as in claim 1, said microprocessor further configured touse said digital samples to calculate a current phase angle value forsaid current component for at least one phase of said electricalservice.
 6. An apparatus as in claim 5, wherein said microprocessor isfurther configured to use said voltage phase angle value and saidcurrent phase angle value to perform a Polarity, Cross Phase and EnergyFlow check.
 7. An apparatus as in claim 6, said microprocessor isconfigured to count of number of Polarity, Cross Phase and Energy Flowerror conditions detected, and is configured to store said count in saidmemory.
 8. An apparatus as in claim 6, said apparatus further comprisinga display, said microprocessor configured to generate an error messagedisplayed on said display if said microprocessor detects a Polarity,Cross Phase or Energy Flow error condition.
 9. An apparatus as in claim8, wherein said error message is one of (a) an error message that islocked on said display until said apparatus is manually reset and (b) anerror message that is cleared if said microprocessor determines that aPolarity, Cross Phase or Energy Flow error condition no longer exists.10. An apparatus as in claim 1, said microprocessor further configuredto use said digital samples and said reference information to perform aPhase Voltage Deviation check.
 11. An apparatus as in claim 10, whereinsaid microprocessor is configured to store in said memory a count of thenumber of Phase Voltage Deviation error conditions detected.
 12. Anapparatus as in claim 10, said apparatus further comprising a display,said microprocessor configured to generate an error message on saiddisplay if said microprocessor detects a Phase Voltage Deviation errorcondition.
 13. An apparatus as in claim 12, wherein said error messageis one of (a) an error message that is locked on said display until saidapparatus is manually reset and (b) an error message that is cleared ifsaid microprocessor determines that a Phase Voltage Deviation errorcondition no longer exists.
 14. An apparatus as in claim 1, saidmicroprocessor further configured to use said digital samples and saidreference information to perform a Current Waveform Distortion check.15. An apparatus as in claim 1, said reference information including aphase-voltage-angle-upper-threshold value and aphase-voltage-angle-lower-threshold value.
 16. An apparatus as in claim15, wherein said microprocessor is configured to compare said voltagephase angle value to said phase-voltage-angle-upper-threshold, saidmicroprocessor configured to generate a phase-voltage-angle-error ifsaid voltage phase angle value exceeds saidphase-voltage-angle-upper-threshold.
 17. An apparatus as in claim 16,wherein said apparatus further comprises a display, said apparatusconfigured to generate an error message on said display if saidphase-voltage-angle-error is generated.
 18. An apparatus as in claim 16,said apparatus storing a count of number of phase-voltage-angle-errorsgenerated.
 19. An apparatus as in claim 15, wherein said microprocessoris configured to compare said voltage phase angle value to saidphase-voltage-angle-lower-threshold and wherein said microprocessor isconfigured to detect a phase-voltage-angle-error if said voltage phaseangle value falls below said phase-voltage-angle-lower-threshold.
 20. Anapparatus as in claim 19, wherein said apparatus further includes adisplay and wherein said apparatus is configured to generate an errormessage on said display if said phase-voltage-angle-error is detected.21. An apparatus as in claim 19, said apparatus configured to store insaid memory a count of number of phase-voltage-angle-errors detected.22. An apparatus as in claim 1, wherein said microprocessor isconfigured to use said digital samples to calculate a voltage phaseangle value for the voltage component of at least two phases of saidelectrical service; and wherein said microprocessor is configured to usethe voltage phase angle values to determine the phase rotation of saidelectrical service.
 23. An apparatus as in claim 22, wherein saidmicroprocessor is configured to generate a phase-rotation-warning if thephase rotation of said electrical service cannot be determined and storein said memory a count of number of phase-rotation-warnings generated.24. An apparatus as in claim 22, wherein said apparatus further includesa display.
 25. An apparatus as in claim 1, wherein said microprocessoris configured to use said digital samples to calculate a current phaseangle value for said current component and wherein said referenceinformation includes a phase-current-angle-upper-threshold value and aphase-current-angle-lower-threshold value.
 26. An apparatus as in claim25, wherein said microprocessor is configured to compare said currentphase angle value to said phase-current-angle-upper-threshold andwherein said microprocessor is configured to generate aphase-current-angle-error if said current phase angle value exceeds saidphase-current-angle-upper-threshold.
 27. An apparatus as in claim 26,wherein said apparatus further includes a display and wherein saidapparatus is configured to generate an error message displayed on saiddisplay if said phase-current-angle-error is generated.
 28. An apparatusas in claim 26, said apparatus configured to store in said memory acount of number of phase-current-angle-errors generated.
 29. Anapparatus as in claim 25, wherein said microprocessor is configured tocompare said current phase angle value to saidphase-current-angle-lower-threshold and wherein said microprocessor isconfigured to generate a phase-current-angle-error if said current phaseangle value falls below said phase-current-angle-lower-threshold.
 30. Anapparatus as in claim 29, wherein said apparatus further includes adisplay and wherein said apparatus is configured to generate an errormessage that is displayed on said display if saidphase-current-angle-error is generated.
 31. An apparatus as in claim 29,said apparatus configured to store in said memory a count of number ofphase-current-angle-errors generated.
 32. An apparatus as in claim 1,wherein said microprocessor is further configured to use said digitalsamples to determine a phase-voltage-magnitude-value for at least onephase of said electrical service and wherein said reference informationincludes at least one of a phase-voltage-magnitude-upper-threshold valueand a phase-voltage-magnitude-lower-threshold value.
 33. An apparatus asin claim 32, wherein said phase-voltage-magnitude-upper-threshold valueis selected from the group consisting of: (a) a value that is apredetermined percentage of a typical phase voltage magnitude value forsaid electrical service; (b) a value that is a predetermined percentageof a previously measured phase voltage magnitude for one of the phasesof said electrical service; and (c) a user-selectable value.
 34. Anapparatus as in claim 33, wherein said microprocessor is configured togenerate a phase-voltage-magnitude-error if saidphase-voltage-magnitude-value exceeds saidphase-voltage-magnitude-upper-threshold.
 35. An apparatus as in claim34, said apparatus configured to store in said memory a count of thenumber of phase-voltage-magnitude-errors generated.
 36. An apparatus asin claim 32, wherein said phase-voltage-magnitude-lower-threshold valueis selected from the group consisting of: (a) a value that is apredetermined percentage of a typical phase voltage magnitude value forsaid electrical service; (b) a value that is a predetermined percentageof a previously measured phase voltage magnitude value for one of thephases of said electrical service; and (c) a user-selectable value. 37.An apparatus as in claim 36, wherein said microprocessor is configuredto generate a phase-voltage-magnitude-error if saidphase-voltage-magnitude-value drops below saidphase-voltage-magnitude-lower-threshold.
 38. An apparatus as in claim37, said apparatus storing in said memory a count of the number ofphase-voltage-magnitude-errors generated.
 39. An apparatus as in claim1, wherein said at least one analog-to-digital converter connected toselected phases of a polyphase electrical service, said microprocessorfurther configured to use said digital samples to calculate a voltagephase angle value for the voltage component of at least one phase ofsaid polyphase electrical service; and wherein said microprocessor isfurther configured to use said digital samples to determine a phasecurrent magnitude value for each phase of said polyphase electricalservice.
 40. An apparatus as in claim 39, wherein said referenceinformation includes a phase-current-magnitude-lower-threshold value anda phase-current-magnitude-upper-threshold value.
 41. An apparatus as inclaim 40, wherein said phase-current-magnitude-lower-threshold value isone of (a) 0.05% of current class and (b) a user selectable value. 42.An apparatus as in claim 41, wherein said microprocessor is configuredto generate a phase-current-magnitude-error if said microprocessordetermines that said phase current magnitude value for at least onephase exceeds said phase-current-magnitude-lower-threshold value whenthe phase current magnitude value for a different phase is determined tobe less than said phase-current-magnitude-lower-threshold value.
 43. Anapparatus as in claim 42, said apparatus storing in said memory a countof the number of phase-current-magnitude-errors generated.
 44. Anapparatus as in claim 43, wherein said apparatus further comprises adisplay and wherein said microprocessor is configured to generate amessage on said display if a phase-current-magnitude-error is generated.